import request from '@/utils/request'
export function list(params) {
  return request({
    url: '/admin/bom/list',
    method: 'get',
    params: params
  })
}

export function save(data) {
  return request({
    url: '/admin/bom/save',
    method: 'post',
    data: data
  })
}

export function del(ids) {
  return request({
    url: '/admin/bom/del/' + ids,
    method: 'post'
  })
}

export function update(data) {
  return request({
    url: '/admin/bom/update',
    method: 'post',
    data: data
  })
}

export function find(id) {
  return request({
    url: '/admin/bom/find/' + id,
    method: 'get'
  })
}

export function emptyBarrel(params) {
  return request({
    url: '/admin/emptyBarrel/list',
    method: 'get',
    params: params
  })
}

export function addEmptyBarrel(data) {
  return request({
    url: '/admin/emptyBarrel/addEmptyBarrel',
    method: 'post',
    data: data
  })
}

export function decEmptyBarrel(data) {
  return request({
    url: '/admin/emptyBarrel/decEmptyBarrel',
    method: 'post',
    data: data
  })
}

export function summary(params) {
  return request({
    url: '/admin/emptyBarrel/summary',
    method: 'post',
    params: params
  })
}